<!DOCTYPE html
          PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html   xmlns   = "http://www.w3.org/1999/xhtml">
<head>
<link rel="STYLESHEET" href="filtersdk.css" type="text/css" />
<title>ChangeFrameSize - AviSynth</title>
</head>

<div id="body">

<h1><a href="http://www.avisynth.org/ChangeFrameSize" style="text-decoration:none">
    ChangeFrameSize</a>
    	<p>
	</h1>

<p>The following example code shows how to double the width of the destination frame</p>

<pre>public:
	ShowPixelValues(PClip _child, IScriptEnvironment* env) :
	GenericVideoFilter(_child)
	{
	// constructor code	
 
        vi.width = vi.width*2; // width is doubled here
        vi.height = vi.height * 2;  // height is also multiplied by 2
	}
    PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
};

PVideoFrame __stdcall ShowPixelValues::GetFrame(int n, IScriptEnvironment* env) {

		PVideoFrame src = child->GetFrame(n, env);
		PVideoFrame dst = env->NewVideoFrame(vi); // new frame is double the size of src
...
</pre>

<p>A Similar approach has to be used for changing colorspace, framerate etc. 
There is a bit more information at <a href="WorkingWithImages.htm">WorkingWithImages</a>.</p>

</div>
<p><kbd>$Date: 2006/11/24 18:21:25 $<br>
Original version of this document at <a href="http://www.avisynth.org/ChangeFrameSize">http://www.avisynth.org/ChangeFrameSize</a>
</kbd></p>
</BODY>
</html>
